package com.cy.pj.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SysUserRoleDao {
	int insertObjects(@Param("id") Integer id,@Param("roleIds") Integer... roleIds);
	
	@Select("select role_id from sys_user_roles where user_id=#{userId}")
	List<Integer> findRolesByUserId(Integer userId);
	
	@Delete("delete from sys_user_roles where user_id = #{id}")
	int deleteObjectByUserId(Integer id);

	List<String> findPermissionByUserId(Integer id);

	List<Integer> findMenuIdsByUserIds(Integer id);
	
}
